home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / reboot.lha / reboot.c < prev    next >
C/C++ Source or Header  |  1992-03-06  |  1KB  |  38 lines

  1. /**********************************************************************/
  2. /*  MF WBTools  reboot.c   - perform a cold reboot of the system!     */
  3. /*                                                                    */
  4. /*  USAGE:  reboot         - asks for confirmation (y/n) then reboots */
  5. /*                                                                    */
  6. /*  13/03/1994  Max Francis                                           */
  7. /**********************************************************************/
  8.  
  9. #include <exec/exec.h>
  10. #include <stdio.h>
  11.  
  12. /* Formatted version string for the 2.0 VERSION command */ 
  13. UBYTE *vers = "\0$VER: MF Reboot v1.0";
  14.  
  15. main( int argc, char *argv[] )
  16. {
  17.     char input[10];
  18.  
  19.     if( argc != 1)
  20.     {
  21.         printf("MF reboot\nPerform a cold reboot of the system\n");
  22.         printf("USAGE: reboot  (no arguments)\n");
  23.         printf("(equivalent of <CTRL><A><A>)\nAsks for confimation once\n");
  24.     }
  25.     else
  26.     {
  27.         printf("Cold Reboot?  Confirm (y/n)\n");
  28.         scanf("%s", &input);
  29.         if( input[0] == 'y' || input[0] == 'Y' )
  30.         {
  31.             ColdReboot();  /* No turning back now! */
  32.         }
  33.         else
  34.         {
  35.             printf("reboot aborted.\n");
  36.         }
  37.     }
  38. }